<div class="content-wrapper" style="min-height: 960px;">
  <section class="content-header">
    <h1>
      {{label}}
    </h1>
    <ol class="breadcrumb">
      <li>
        <a [routerLink]="['/main']">
          <i class="fa fa-dashboard"></i>首页
        </a>
      </li>
      <li>
        <a [routerLink]="['/user/list']">用户列表</a>
      </li>
      <li class="active">
        <a [routerLink]="['/user/detail']">{{label}}</a>
      </li>
    </ol>
  </section>
  <section class="content">
    <div class="row">
      <div class="col-md-12">
        <div class="box">
          <div class="box-header"></div>
          <form class="form-horizontal">
            <div class="box-body">
              <div class="col-md-3"></div>
              <div class="col-md-6">
                <div class="form-group">
                  <label for="exampleInputName" class="col-sm-3 control-label" style="padding-top: 7px">用户姓名</label>
                  <div class="col-sm-9">
                    <input type="text" id="exampleInputName" name="exampleInputName" class="form-control" placeholder="请输入用户姓名" [(ngModel)]="user.name">
                  </div>
                </div>
                <div class="form-group">
                  <label for="exampleInputEmail" class="col-sm-3 control-label" style="padding-top: 7px">用户邮箱</label>
                  <div class="col-sm-9">
                    <input type="text" id="exampleInputEmail" name="exampleInputEmail" class="form-control" placeholder="请输入用户邮箱" [(ngModel)]="user.email">
                  </div>
                </div>
                <div class="form-group">
                  <label for="exampleInputRole" class="col-sm-3 control-label" style="padding-top: 7px">用户身份</label>
                  <div class="col-sm-9">
                    <select id="exampleInputRole" name="exampleInputRole" class="form-control" [(ngModel)]="user.roleId">
                      <option value="-1">请选择用户身份</option>
                      <option *ngFor="let role of roles" value="{{role.id}}">{{role.name}}</option>
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label for="exampleInputMobile" class="col-sm-3 control-label" style="padding-top: 7px">用户手机</label>
                  <div class="col-sm-9">
                    <input type="text" id="exampleInputMobile" name="exampleInputMobile" class="form-control" placeholder="请输入用户手机" [(ngModel)]="user.mobile">
                  </div>
                </div>
                <div class="form-group">
                  <label for="exampleInputPWD" class="col-sm-3 control-label" style="padding-top: 7px">用户密码</label>
                  <div class="col-sm-9">
                    <input type="password" id="exampleInputPWD" name="exampleInputPWD" class="form-control" placeholder="请输入用户密码" [(ngModel)]="user.password">
                  </div>
                </div>
                <div class="form-group">
                  <div class="col-md-3"></div>
                  <div class="col-md-6">
                    <button class="btn btn-primary" (click)="save()">保存</button>
                    <button class="btn btn-danger" (click)="delete()" *ngIf="edit">删除</button>
                    <button class="btn btn-default" (click)="goBack()">返回</button>
                  </div>
                  <div class="col-md-3"></div>
                </div>
              </div>
              <div class="col-md-2"></div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </section>
</div>

